/*
 * @Author: yuandawei
 * @Date: 2020-11-16 10:29:09
 * @LastEditTime: 2020-11-20 14:43:07
 * @LastEditors: Please set LastEditors
 * @Description: 分销员请求API
 * @FilePath: \vue-admin-beautiful-pro-template\src\api\distribution.js
 */
import request from '@/utils/request'

// 查询分销员列表
export function getDistributorList(params) {
  return request({
    url: '/distributor/getDistributorPageList.do',
    method: 'GET',
    params,
  })
}

// 分销员所有上下级列表
export function getDistributorUpDown(params) {
  return request({
    url: '/distributor/findLevelUpPageList.do',
    method: 'GET',
    params,
  })
}

// 查询分销员详情
export function getDistributorDetail(params) {
  return request({
    url: '/distributor/getDistributorById.do',
    method: 'GET',
    params,
  })
}

// 解绑上下级
export function unbindSuperior(data) {
  return request({
    url: '/distributor/relieveLevel.do',
    method: 'POST',
    data,
  })
}

// 绑定上下级
export function bindSuperior(data) {
  return request({
    url: '/distributor/choiceLevel.do',
    method: 'POST',
    data,
  })
}

// 修改分销员备注
export function editDistributorRemark(data) {
  return request({
    url: '/distributor/setRemark.do',
    method: 'POST',
    data,
  })
}

// 修改分销员积分
export function editDistributorPoints(params) {
  return request({
    url: '/distributor/changePoints.do',
    method: 'POST',
    params,
  })
}
